@layout("/common/_container.html"){
<link href="${ctxPath}/static/css/balance/checkout_method.css?v=20200718" rel="stylesheet">
<div class="ibox float-e-margins" style="height: 100%">
    <div style="display: none">
        <input type="hidden" id="sortMap" value="">
        <input type="hidden" id="reservationsId" value="${reservationsId}">
        <input type="hidden" id="customerId" value="${customerId}">
        <input type="hidden" id="operationTime" value="${operationTime}">
        <input type="hidden" id="getTime" value="${getTime}">
        <input type="hidden" id="id" value="${id}">
        <input type="hidden" id="totleFoldingPay" value="">
        <input type="hidden" id="totleServiceActualPay" value="">
        <input type="hidden" id="surplusAmount" value="0">
        <input type="hidden" id="reservationsIdx" value="${reservationsIdx}">
        <input type="hidden" id="startTime" value="">
        <input type="hidden" id="endTime" value="">
        <input type="hidden" id="payorrefund" value="">
        <input type="hidden" id="isDoNameValue" value="${totalmoney.isDoName}">
        <input type="hidden" id="totalFoldingPay" value="${totalmoney.totalFoldingPay}">
        <input type="hidden" id="totlDeductionAmount" value="${totalmoney.totlDeductionAmount}">
        <input type="hidden" id="totaldepositAmount" value="${totalmoney.totaldepositAmount}">
        <input type="hidden" id="totleArrears" value="${totalmoney.totleArrears}">
        <input type="hidden" id="totleServiceActualPay2" value="${totalmoney.totleServiceActualPay}">
        <input type="hidden" id="totaldepositAmount2" value="${totalmoney.totaldepositAmount2}">
        <input type="hidden" id="sttleAccountsTime" value="">
    </div>
    <div style="height: 100%">
        <div style="background: #337bb6;color: white;padding: 5px 15px;height: 32px;">${totalmoney.isDoName}</div>
        <div style="background: #f4f4f4;display: flex;padding: 8px 25px;font-weight: bold;height: 39px;">
            <div style="flex: 1">
                <span style="color: #337bb7;font-size: 16px;">${consultantInfo.customerName}</span>
                <span style="margin-left: 15px;">${consultantInfo.customerPhone}</span>
                <span style="margin-left: 15px;">${consultantInfo.customerAge}岁/${consultantInfo.sex}</span>
                <span style="margin-left: 15px;">${consultantInfo.outpatientName}/${consultantInfo.medicalRecordNumber}</span>
            </div>
            <div style="flex: 1;text-align: right">
                <span>科室：<span>${consultantInfo.treatmentUnit}</span></span>
                <span style="margin-left: 15px;">TC：${consultantInfo.tcName}</span>
                <span style="margin-left: 15px;">收费人：${userName}</span>
            </div>
        </div>
        <div style="height: calc(100% - 72px);overflow: auto">
            <div style="overflow:auto;padding: 8px 15px 0px 23px;margin:0;" class="panel" id="totalSum">
                <div style="display: flex;padding: 2px;color: #666a73;border-bottom: 2px solid #9ea6b9;text-align: center">
                    <span style="flex: 2;">项目名称</span>
                    <span style="flex: 1;">牙位</span>
                    <span style="flex: 1;">医生</span>
                    <span style="flex: 0.5;">单位</span>
                    <span style="flex: 1;">单价</span>
                    <span style="flex: 0.5;">数量</span>
                    <span style="flex: 1;">原价</span>
                    <span style="flex: 1;">折后金额</span>
                    <span style="flex: 1;">折扣%</span>
                    <span style="flex: 1;">抵扣金额</span>
                    <span style="flex: 1;">抵扣方式</span>
                    <span style="flex: 1;">储值抵扣</span>
                    <span style="flex: 1;">本次应缴</span>
                </div>
                <div id="openBillList" style="border-bottom: 1px solid #dddddd;padding: 5px 0;"></div>
                <div style="display: flex;text-align: center;">
                    <span style="flex: 1;">开单备注：</span>
                    <span style="flex: 3.8;text-align: left;">该患者现在在${totalmoney.isDoName}</span>
                    <span style="flex: 0.2"></span>
                    <span style="flex: 1;font-weight: bold;">合计：</span>
                    <span style="flex: 1;">${totalmoney.totalDiscountHide}</span>
                    <span style="flex: 1;">${totalmoney.totalFoldingPay}</span>
                    <span style="flex: 1;">${totalmoney.wholeDiscount}</span>
                    <span style="flex: 1;">${totalmoney.totlDeductionAmount}</span>
                    <span style="flex: 1;"></span>
                    <span style="flex: 1;">${totalmoney.totaldepositAmount}</span>
                    <span style="flex: 1;" id="ys1"></span>
                </div>
            </div>
            <div style="padding: 50px 20px 0;background: white;">
                <div style="background: #f4f4f4;border-radius: 3px;padding: 0 5px;">
                    <div class="historyBox" style="padding-left: 10px;display: flex;align-items: center;">
                        <div class="whiteBox" id="checkoutType" style="font-weight: bold;"></div>
                        @if(totalmoney.isDoName == '消费'){
                        <div style="margin-left: 20px;">
                            <span>正畸编号：</span>
                            <input type="text" id="orthodontics">
                        </div>
                        @}
                    </div>
                    <div class="historyBox" style="padding-left: 10px;position: relative">
                        <div class="whiteBox" style="display: flex;">
                            <div style="flex: 1">
                                <span>支付方式</span>
                                <select class="selectBox checkoutMethodName selectStyles" name="checkoutMethodName">
                                    @for(item in checkoutMethodList){
                                    <option value="${item.checkoutMethod}">${item.checkoutMethod}</option>
                                    @}
                                </select>
                            </div>
                            <div style="flex: 1">
                                <span id="doType"></span>
                                <input autocomplete="off" class="amountOfBalance2 selectStyles" name="amountOfBalance2" oninput="amountOfBalance(this)"/>
                            </div>
                        </div>
                        <div id="addWay" style="position: absolute;left: 710px;top: 25px;transform: translateY(-50%);font-size: 16px;"> <span class="glyphicon glyphicon-plus"></span></div>
                        <div id="reduceWay" style="position: absolute;left: 735px;top: 25px;transform: translateY(-50%);font-size: 16px;"> <span class="glyphicon glyphicon-minus"></span></div>
                    </div>
                    <div style="padding: 6px 15px;">
                        <span style="vertical-align: top;display: inline-block;width: 48px;">备注：</span>
                        <textarea name="remarks" id="remarks" style="width: 440px;">${totalmoney.remarks}</textarea>
                    </div>
                </div>
            </div>
            <div class="btnBox">
                <button type="button" id="ensure" class="btn" onclick="rechargeCheckOut()">确定</button>
                <button type="button" id="cancel" style="background: #999999" class="btn" onclick="parent.layer.close(parent.layer.getFrameIndex(window.name))">取消</button>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/static/modular/balance/checkout_method.js?v=20200718"></script>
@}